package com.gm.wholesale.module.aftersale.model;

import com.gm.commonlib.base.baseBean.BaseListResp;
import com.gm.commonlib.base.baseBean.DataResp;
import com.gm.commonlib.base.baseui.baseFragment.BaseFragment;
import com.gm.commonlib.network.BaseHttpObserver;
import com.gm.commonlib.network.HttpClient;
import com.gm.commonlib.network.HttpServicesHolder;
import com.gm.wholesale.module.aftersale.bean.AftersalesBean;
import com.gm.wholesale.module.good.api.IGoodApi;
import com.gm.wholesale.module.good.bean.GoodBean;
import com.gm.wholesale.module.order.api.IOrderApi;

import io.reactivex.Observable;

public class AfterSaleModel {

    //获取售后列表数据
    public static void getAfterSales(long orderId, BaseHttpObserver<BaseListResp<AftersalesBean>> observer) {
        HttpClient.sendRequest(null, new HttpServicesHolder<IOrderApi, BaseListResp<AftersalesBean>>() {
            @Override
            public Observable<BaseListResp<AftersalesBean>> getHttpObservable(IOrderApi instance) {
                return instance.getAfterSalesBeans(orderId);
            }
        }, observer);
    }
}
